package com.codechuan.didi_web;

import com.codechuan.didi_web.common.Constant;
import com.codechuan.didi_web.entity.SysUserAccount;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.text.SimpleDateFormat;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;

@SpringBootApplication
@MapperScan(basePackages = "com.codechuan.didi_web.mapper")
public class DidiWebApplication {

    private static final ConcurrentHashMap<Long, SysUserAccount> objectMap = new ConcurrentHashMap<>();

    public static void main(String[] args) {
        Constant.format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Constant.executorService = Executors.newFixedThreadPool(50000);
        Constant.objectMap = objectMap;
        SpringApplication.run(DidiWebApplication.class, args);

    }

}
